import {createStore,applyMiddleware} from 'redux'
import createSagaMiddleware from 'redux-saga'

const sagaMiddleware = createSagaMiddleware()

import reducer from './reducer'
import sagas from './sagas'


const store = createStore(
    reducer,
    applyMiddleware(sagaMiddleware)
  ) 

sagas.forEach(value => {
    sagaMiddleware.run(value)
  })

export default store